package com.study.kt._04project.game_tank.ext

import com.study.kt._04project.game_tank.model.View

/**
 * 为View添加判断是否碰撞的扩展方法
 * @param view 目标View
 */
fun View.checkCollision(view: View): Boolean {
    return checkCollision(x, y, width, height, view.x, view.y, view.width, view.height)
}